home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 08 (1988)(MegaDisc Digital Publishing)(AU)[WB].zip / MegaDisc 08 (1988)(MegaDisc Digital Publishing)(AU)[WB].adf / PROGRAMS / SELECT&SWITCH < prev    next >
Text File  |  1988-05-28  |  6KB  |  151 lines

  1.  
  2.          SELECTing DIFFERENT BATCH FILES/STARTUP-SEQUENCES
  3.  
  4.             AND SWITCHing YES/NO IN STARTUP-SEQUENCES
  5.  
  6.                          WITH THE MOUSE
  7.  
  8.          [Ed: Those not too clear about Startup-sequences/batch files
  9.     should have a look at the "Startup-Sequences" piece in the Tutorials
  10.     drawer, and also "Enhancing_WB" and "SC-II.Part1"  in the Articles
  11.     drawer, all of which have explanations and examples on this topic.
  12.     Further information in "Batch-Files" on MD6.]
  13.  
  14.          In this drawer, you'll find two programs called SELECT and SWITCH
  15.     by Mark Constable. SELECT is a utility which can be used from either
  16.     Workbench(it's got an icon) or CLI, which allows you to select any of
  17.     10 different batch files at any time, allowing you to execute
  18.     practically any series of commands. All you have to do is to create a
  19.     number of Batch files, called  s01, s02,..., s10  and place them in the
  20.     S directory of your boot disk (examples below). Then you need to run
  21.     the program SELECT (which you should put in your C directory), by
  22.     double-clicking the icon or entering the command SELECT in the CLI.
  23.     The best use, however, is to edit your startup-sequence to include,
  24.     towards the beginning, the command
  25.     select
  26.     by itself - this will bring up the SELECT COMMAND STRIP just under the
  27.     Workbench menu bar, and clicking on any of the NUMBERS will execute the
  28.     batch file corresponding to that number (ie, clicking 3 will execute
  29.     the batch file called  s03).   On the Command Strip, clicking on the
  30.     "Select" button gives a short description of the program; clicking on
  31.     "Menu" will display a menu written by you and placed in the S directory
  32.     describing what each numbered batch file does (see below for example),
  33.     and clicking on any of the numbers executes the required batch file.
  34.     Note that you can edit the various  S files to contain whatever you
  35.     want and be as large as you want. So you may want to set up your main
  36.     startup-sequence to bring up SELECT, and create all kinds of different
  37.     possible branches from there. Experiment. In the meantime, to try out
  38.     the program, use a text editor such as ED to cut the example S files
  39.     below from this document and save them to your S directory.
  40.  
  41.     Another little bonus by Mark is the utility SWITCH, which is just like
  42.     the command ASK or QUERYANY, except that when a question is asked in a
  43.     batch file you click on a button which comes up in the middle of the
  44.     screen giving you a YES/NO option. There's an example of its use below
  45.     in the   s05  example batch file.
  46.  
  47.  ----------------------------------------------------------------------
  48.    sys:s/sMenu
  49.                     Example of a Menu for ` Select'
  50.                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  51.                     1.       Test of Info command
  52.  
  53.                     2.       Test of List command
  54.  
  55.                     3.       Test of Assign command
  56.  
  57.                     4.       Test of Dir command
  58.  
  59.                     5.       Test of Switch command
  60.  
  61.                     6.       Edit No. 1
  62.  
  63.                     7.       Edit No. 2
  64.  
  65.                     8.       Edit No. 3
  66.  
  67.                     9.       Edit No. 4
  68.  
  69.                     10.      Edit No. 5
  70.  
  71. ;------------------------------------------------------------------
  72. ;     S:s01             for use with Select by .mC.Software
  73.  
  74. Echo "Example of using `Select' with the Info command*n"
  75.  
  76. Info
  77.  
  78. Wait 5
  79. ;-------------------------------------------------------------------
  80. ;     S:s02             for use with Select by .mC.Software
  81.  
  82. Echo "Example of using `Select' with the List command*n"
  83.  
  84. List
  85.  
  86. Wait 5
  87. ;-------------------------------------------------------------------
  88. ;     S:s03             for use with Select by .mC.Software
  89.  
  90. Echo "Example of using `Select' with the Assign command*n"
  91.  
  92. Assign
  93.  
  94. Wait 5
  95. ;-------------------------------------------------------------------
  96. ;     S:s04             for use with Select by .mC.Software
  97.  
  98. Echo "Example of using `Select' with the Dir command*n"
  99.  
  100. dir df0: opt a
  101.  
  102. Wait 5
  103. ;-------------------------------------------------------------------
  104. ;     S:s05             for use with Select by .mC.Software
  105.  
  106. Echo "Example of using `Select' with the Switch command*n*n"
  107.  
  108. Echo "      Select   -   Yes  or  No *n"
  109. Switch
  110. If WARN
  111.   Echo "   You hit the `Yes' option*n"
  112.  Else
  113.   Echo "   You hit the `No' option *n"
  114. Endif
  115.  
  116. Wait 5
  117. ;-------------------------------------------------------------------
  118. ;     S:s06             for use with Select by .mC.Software
  119.  
  120. Echo "Example of using `Select' with the Ed command*n*n"
  121.  
  122. Ed S:s01
  123. ;-------------------------------------------------------------------
  124. ;     S:s07             for use with Select by .mC.Software
  125.  
  126. Echo "Example of using `Select' with the Ed command*n*n"
  127.  
  128. Ed S:s02
  129. ;-------------------------------------------------------------------
  130. ;     S:s08             for use with Select by .mC.Software
  131.  
  132. Echo "Example of using `Select' with the Ed command*n*n"
  133.  
  134. Ed S:s03
  135. ;-------------------------------------------------------------------
  136. ;     S:s09             for use with Select by .mC.Software
  137.  
  138. Echo "Example of using `Select' with the Ed command*n*n"
  139.  
  140. Ed S:s04
  141. ;-------------------------------------------------------------------
  142. ;     S:s10             for use with Select by .mC.Software
  143.  
  144. Echo "Example of using `Select' with the Ed command*n*n"
  145.  
  146. Ed S:s05
  147. ;-------------------------------------------------------------------
  148.  
  149.  XXXXXXXXXXXXXXXXXXXXXXXXX END OF SELECT&SWITCH XXXXXXXXXXXXXXXXXXXXXXXXXX
  150.  
  151.